Repository navigation
test(aggregator): behavioural tests for bandLaneChart (#8600) - #8654
Merged
Merged
Conversation
…string pins (#8600) New test/band-lane-chart.test.ts extracts the real bandLaneChart + helpers verbatim from the emitted explorer script (renderAa page) and executes them against known band data: axis range comes from members while plotted points come from choices (a member-only $500 stretches the axis, last tick $500.00, but draws no point), log geometry (0.5/5/500 -> cx 232.0/402.7), leader vs near-leader styling (r 5/#fff/0.95 vs 3.8/0.65, explicit leader by key wins), the lo===hi widening for cost ([/1.4, *1.4], point at log centre 488.0) and score ([-1, +1], linear centre), and the empty render cases. Lane cy geometry (38.0/40.5) pins the pointY-vs-cy behaviour in executed form. aa.test.ts: the five lane-chart source-string assertions (function bandLaneChart, class=xpl-band-lanes, the group-6 call-site text, const pointY / not-const-cy) are removed in favour of these; bandGroup composition and g6Lanes.push data-plumbing pins stay. New file: 5 pass / 0 fail. aa.test.ts itself cannot run in this sandbox (its server-spawning beforeAll hook times out identically on a pristine worktree of the same base — pre-existing environmental).
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 27 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8600.
What
The Cost Explorer band lane charts (PR #3972) had no behavioural test:
aa.test.tsonly asserted the emitted page contains the renderer's source strings, andbandLaneChartnever executed against data.New
test/band-lane-chart.test.tsextracts the realbandLaneChartand its helpers (esc,fmt$,fmtT,fmtN,shortLabel,ESHORT) verbatim from the emitted explorer script inrenderAa's page — no copies — and runs them against known band data:$500.00) but draws no point; 3 members / 2 choices → exactly 2 plotted circles.choices[0](or an explicitband.leaderby key) renders r=5, white stroke, 0.95 opacity, "— band leader"; others r=3.8 / 0.65 / "— near-leader".lo === hiwidening: single cost 10 → widened [10/1.4, 10·1.4], point at the log centre (488.0); single score 80 → [79, 81] on the linear scale, also centred."".aa.test.ts: the five lane-chart source-string assertions (function bandLaneChart,class="xpl-band-lanes", the group-6 call-site text,const pointY/ not-const cy) are removed in favour of the behavioural ones; the bandGroup composition andg6Lanes.pushdata-plumbing pins stay.Tests
test/band-lane-chart.test.ts: 5 pass / 0 fail.test/aa.test.tscannot execute in the sandbox environment: its server-spawningbeforeAllhook times out identically (0 pass / 1 fail) on a pristine worktree of the same base commit — pre-existing and unrelated; the file's edits are assertion removals only, andtsc --noEmitis clean for both touched files.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.